package com.szcinda.service.dto.carrier;

import com.szcinda.repository.CalculateType;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

@Data
public class CarrierDetailDto implements Serializable {
    private String id;
    private String code;
    private String name;
    private String fullName;
    private String licence;
    private int settlementDays;
    private String organizationId;

    private ContractDto contract;

    private List<ExchangeRateDto> rates;

    @Data
    public static class ContractDto implements Serializable {
        private String contractNumber;
        private String contractName;
        private LocalDate signedDate;
        private LocalDate expiresDate;
        private LocalDate remindDate;
    }

    @Data
    public static class LinePrice implements Serializable {
        private String from;
        private String to;
        private CalculateType calculateType;
    }

    @Data
    public static class ExchangeRateDto implements Serializable {
        private String id;
        private String fromRate;
        private String toRate;
        private double rate;
    }
}
